<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center publishConvenientPeople_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub publishConvenientPeople_fd0_0'>
					<view class='flex flex-wrap align-center publishConvenientPeople_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='publishConvenientPeople_fd0_0_c0_c0'>取消</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='publishConvenientPeople_fd0_0_c1_c0'>发便民</text>
					</view>
					<view class='flex flex-wrap align-center justify-end publishConvenientPeople_fd0_0_c0'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout publishConvenientPeople_flex_1">
				<view class='flex flex-direction flex-wrap align-stretch publishConvenientPeople_fd1_0'>
					<view class='flex flex-wrap publishConvenientPeople_fd1_0_c0'>
						<textarea class='flex publishConvenientPeople_input_fd1_0_c0' :placeholder="'请输入内容'"
							:maxlength="240" placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx"
							v-model="fd1_0_c0" />
					</view>
					<benben-images-upload ref="benbenImagesUploadfd1_0_c1" :maxlength="9" :img-ids.sync="thumb"
						:img-list.sync="thumb_url" :is-show-tips='true'>
						<template #content="{ num, maxlength, isShow, imgList }">
							<view class="flex flex-wrap align-start flex">

								<view v-for="(image, index) in imgList" :key="index"
									class='flex position-relative publishConvenientPeople_fd1_0_c10'>
									<text class='fu-iconfont2 position-absolute publishConvenientPeople_fd1_0_c100'
										@tap.stop="$refs.benbenImagesUploadfd1_0_c1.delImage(index)">&#xE8E7;</text>
									<image class='publishConvenientPeople_fd1_0_c101'
										@tap.stop="$refs.benbenImagesUploadfd1_0_c1.previewImage(index)"
										mode="aspectFill" :src='image'></image>
								</view>
								<image class='publishConvenientPeople_fd1_0_c11'
									@tap.stop="$refs.benbenImagesUploadfd1_0_c1.manyChooseImage()" v-if="isShow"
									mode="aspectFit" :src='STATIC_URL+"60.png"'></image>

							</view>
						</template>
					</benben-images-upload>
				</view>
				<view class='flex flex-direction flex-wrap align-stretch justify-between publishConvenientPeople_fd1_1'>
					<view class='flex flex-wrap align-center justify-between publishConvenientPeople_fd1_1_c0'>
						<view class='flex flex-wrap align-center'>
							<text class='publishConvenientPeople_fd1_1_c0_c0_c0'>*</text>
							<text class='publishConvenientPeople_fd1_1_c0_c0_c1'>联系人</text>
						</view>
						<input class='publishConvenientPeople_fd1_1_c0_c1_c0' type="text" :placeholder="`请输入`"
							confirm-type="done" :maxlength="7"
							placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx" v-model="contacts" />
					</view>
					<view class='flex flex-wrap align-center justify-between publishConvenientPeople_fd1_1_c0'
						style="border: none;">
						<view class='flex flex-wrap align-center'>
							<text class='publishConvenientPeople_fd1_1_c0_c0_c0'>*</text>
							<text class='publishConvenientPeople_fd1_1_c0_c0_c1'>联系电话</text>
						</view>
						<input class='publishConvenientPeople_fd1_1_c0_c1_c0' type="number" :placeholder="`请输入`"
							confirm-type="done" :maxlength="11"
							placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx" v-model="contact_number" />
					</view>
				</view>
				<button class='publishConvenientPeople_fd1_2' @click="pushBianM">发布</button>
			</view>
			<!---flex布局flex布局结束-->
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},
		data() {
			return {
				"pickerDiy1695796831273": false,
				"fd1_0_c0": "",
				"type": [{
					"name": "招工",
					"aid": "1"
				}, {
					"name": "维修",
					"aid": "2"
				}, {
					"name": "转让",
					"aid": "3"
				}, {
					"name": "供需",
					"aid": "4"
				}, {
					"name": "身边事",
					"aid": "5"
				}],
				"id": "",
				"name": "",
				thumb: '',
				thumb_url: [],
				contacts: '',
				contact_number: '',
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				aid
			} = options
			if (aid) this.id = aid
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			pushBianM() {
				if (!validate(this.contact_number, 'require')) {
					this.$message.info('请输入手机号');
					return false;
				}
				if (!validate(this.contact_number, 'phone')) {
					this.$message.info('请输入正确的手机号');
					return false;
				}
				uni.showLoading({
					title: '加载中'
				})
				let arr = {
					tupian: JSON.stringify(this.thumb_url),
					buycate_id: this.id,
					xiangqingmiaoshu: this.fd1_0_c0,
					contacts: this.contacts,
					contact_number: this.contact_number
				}
				this.$api.post('/m6752/666c1147885af', arr).then(res => {
					uni.hideLoading()
					if (res.data.code == 1) {
						uni.redirectTo({
							url: `/pages/mine/successPublish/successPublish?id=2`
						})
					}
				})
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;
	}

	.publishConvenientPeople_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.publishConvenientPeople_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 36rpx;
	}

	.publishConvenientPeople_fd0_0_c0_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 30rpx;
	}

	.publishConvenientPeople_fd0_0_c0 {
		width: 120rpx;
	}

	.publishConvenientPeople_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.publishConvenientPeople_flex_1 {
		padding: 24rpx 24rpx 0rpx 24rpx;
	}

	.publishConvenientPeople_fd1_2 {
		background: #FC5F80;
		border-radius: 60rpx 60rpx 60rpx 60rpx;
		width: 638rpx;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #fff;
		height: 88rpx;
		position: fixed;
		margin: 0rpx 0rpx 0rpx 32rpx;
		font-weight: 500;
		bottom: calc(40rpx + var(--window-bottom));
	}

	.publishConvenientPeople_fd1_1_c0_c1_c1 {
		width: 28rpx;
		height: 28rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 15rpx;
	}

	.publishConvenientPeople_fd1_1_c0_c1_c0 {
		text-align: right;
	}

	.publishConvenientPeople_fd1_1_c0_c0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
	}

	.publishConvenientPeople_fd1_1_c0_c0_c0 {
		color: #EA4040;
		font-size: 32rpx;
		font-weight: 400;
	}

	.publishConvenientPeople_fd1_1_c0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.publishConvenientPeople_fd1_1 {
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 0rpx 23rpx 0rpx 25rpx;
	}

	.publishConvenientPeople_fd1_0_c11 {
		width: 212rpx;
		height: 212rpx;
		margin: 0rpx 6rpx 6rpx 0rpx;
		border-radius: 16rpx;
	}

	.publishConvenientPeople_fd1_0_c101 {
		width: 212rpx;
		height: 212rpx;
		border-radius: 16rpx;
	}

	.publishConvenientPeople_fd1_0_c100 {
		top: 0rpx;
		right: 0rpx;
		z-index: 10;
		color: rgba(242, 242, 242, 1);
		margin: 10rpx 10rpx 0rpx 0rpx;
		font-size: 46rpx;
	}

	.publishConvenientPeople_fd1_0_c10 {
		margin: 0rpx 6rpx 6rpx 0rpx;
		width: 212rpx;
		height: 212rpx;
		border-radius: 16rpx;
	}

	.publishConvenientPeople_input_fd1_0_c0 {
		width: 100%;
		height: 140rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		white-space: pre-wrap;
	}

	.publishConvenientPeople_fd1_0_c0 {
		background: #F8F8F8;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 24rpx;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.publishConvenientPeople_fd1_0 {
		background: var(--benbenbgColor1);
		margin: 0rpx 0rpx 32rpx 0rpx;
		padding: 32rpx 24rpx 32rpx 24rpx;
		border-radius: 16rpx;
		background-size: 100% auto;
	}

	.publishConvenientPeople_picker2_0_c2 {
		color: rgba(252, 95, 128, 1);
		font-size: 32rpx;
	}

	.publishConvenientPeople_picker2_0_c1 {
		color: #333333;
		font-size: 36rpx;
		font-weight: 500;
	}

	.publishConvenientPeople_picker2_0_c0 {
		color: var(--benbenFontColor2);
		font-size: 32rpx;
	}

	.publishConvenientPeople_picker2_0 {
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
		border-radius: 25rpx 25rpx 0rpx 0rpx;
		background-size: 100% auto !important;
	}
</style>